import numpy as np
import pandas as pd
bb= pd.read_csv('Big Basket list.csv')
bb
| Unnamed: 0 | Product Name | Price | MRP | Sub Category | Category | |
|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285.00 | 330 | Tea | Beverages |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132.00 | 170 | Tea | Beverages |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526.00 | 531 | Tea | Beverages |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500.00 | 550 | Tea | Beverages |
| 4 | 15 | Taj Mahal Tea 500 g | 391.00 | 410 | Tea | Beverages |
| ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194.00 | 200 | Fruit juices | Beverages |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 48.00 | 60 | Fruit juices | Beverages |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 59.00 | 100 | Fruit juices | Beverages |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85.00 | 85 | Coffee | Beverages |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274.35 | 295 | Coffee | Beverages |
119 rows × 6 columns
dm= pd.read_csv('DMart list.csv')
dm
| Unnamed: 0 | Product Name | Price | MRP | Sub Category | Category | |
|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 275.00 | 330 | Tea | Beverages |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 154.00 | 170 | Tea | Beverages |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 485.00 | 531 | Tea | Beverages |
| 3 | 14 | Taj Mahal Tea 1 Kg | 550.00 | 550 | Tea | Beverages |
| 4 | 15 | Taj Mahal Tea 500 g | 140.00 | 410 | Tea | Beverages |
| ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 199.00 | 200 | Fruit juices | Beverages |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 54.00 | 60 | Fruit juices | Beverages |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 67.00 | 100 | Fruit juices | Beverages |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85.00 | 85 | Coffee | Beverages |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274.35 | 295 | Coffee | Beverages |
119 rows × 6 columns
jm= pd.read_csv('JioMart list.csv')
jm
| Unnamed: 0 | Product Name | Price | MRP | Sub Category | Category | |
|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 280.00 | 330 | Tea | Beverages |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 166.00 | 170 | Tea | Beverages |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 485.00 | 531 | Tea | Beverages |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500.00 | 550 | Tea | Beverages |
| 4 | 15 | Taj Mahal Tea 500 g | 247.00 | 410 | Tea | Beverages |
| ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 150.00 | 200 | Fruit juices | Beverages |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 54.00 | 60 | Fruit juices | Beverages |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 67.00 | 100 | Fruit juices | Beverages |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85.00 | 85 | Coffee | Beverages |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274.35 | 295 | Coffee | Beverages |
119 rows × 6 columns
jm_Price = jm['Price'].tolist()
jm_Price
[280.0, 166.0, 485.0, 500.0, 247.0, 90.0, 135.0, 497.0, 84.0, 190.0, 350.0, 75.0, 125.0, 5.0, 450.0, 250.0, 178.0, 92.0, 600.0, 710.0, 362.0, 155.0, 273.0, 192.0, 360.0, 233.0, 240.0, 377.0, 560.0, 820.0, 235.0, 310.0, 260.0, 230.0, 292.0, 120.0, 120.0, 160.0, 270.0, 480.0, 320.0, 392.0, 110.0, 679.0, 349.0, 460.0, 190.0, 90.0, 110.0, 260.0, 160.0, 190.0, 190.0, 180.0, 1002.0, 290.0, 580.0, 470.0, 490.0, 99.0, 269.0, 409.0, 179.0, 170.0, 110.0, 87.42, 47.43, 94.86, 237.15, 176.7, 69.75, 139.5, 60.45, 259.47, 104.16, 60.0, 57.5, 60.0, 139.5, 9.3, 221.0, 511.5, 139.5, 221.0, 221.0, 221.0, 427.8, 69.75, 83.7, 35.0, 85.0, 73.34, 90.0, 44.0, 27.0, 27.0, 27.0, 9.0, 30.69, 61.2, 90.0, 99.0, 35.0, 99.0, 35.0, 35.0, 35.0, 9.3, 99.0, 74.4, 74.4, 54.0, 112.5, 54.0, 150.0, 54.0, 67.0, 85.0, 274.35]
bb['JioMart Price'] = jm_Price
bb
| Unnamed: 0 | Product Name | Price | MRP | Sub Category | Category | JioMart Price | |
|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285.00 | 330 | Tea | Beverages | 280.00 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132.00 | 170 | Tea | Beverages | 166.00 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526.00 | 531 | Tea | Beverages | 485.00 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500.00 | 550 | Tea | Beverages | 500.00 |
| 4 | 15 | Taj Mahal Tea 500 g | 391.00 | 410 | Tea | Beverages | 247.00 |
| ... | ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194.00 | 200 | Fruit juices | Beverages | 150.00 |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 48.00 | 60 | Fruit juices | Beverages | 54.00 |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 59.00 | 100 | Fruit juices | Beverages | 67.00 |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85.00 | 85 | Coffee | Beverages | 85.00 |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274.35 | 295 | Coffee | Beverages | 274.35 |
119 rows × 7 columns
dm_Price = dm['Price'].tolist()
dm_Price
[275.0, 154.0, 485.0, 550.0, 140.0, 90.0, 145.0, 520.0, 99.0, 274.0, 373.0, 111.0, 130.0, 5.0, 450.0, 276.0, 220.0, 111.0, 640.0, 720.0, 380.0, 162.0, 299.0, 200.0, 421.0, 242.0, 262.0, 383.0, 575.0, 989.0, 243.0, 321.0, 269.0, 266.0, 323.0, 150.0, 132.0, 173.0, 254.0, 525.0, 333.0, 434.0, 129.0, 679.0, 349.0, 500.0, 220.0, 111.0, 130.0, 280.0, 163.0, 199.0, 199.0, 191.0, 1030.0, 292.0, 670.0, 520.0, 520.0, 108.0, 269.0, 480.0, 174.0, 170.0, 120.0, 75.0, 45.0, 90.0, 225.0, 160.0, 65.0, 125.0, 55.0, 240.0, 99.0, 58.0, 55.0, 59.0, 129.0, 9.0, 259.0, 499.0, 129.0, 225.0, 221.0, 221.0, 430.0, 55.0, 83.7, 35.0, 79.0, 71.0, 84.0, 41.0, 25.0, 25.0, 25.0, 9.0, 29.0, 59.0, 89.0, 89.0, 35.0, 85.0, 35.0, 35.0, 35.0, 9.3, 96.0, 73.0, 73.0, 54.0, 145.0, 54.0, 199.0, 54.0, 67.0, 85.0, 274.35]
bb['DMart Price'] = dm_Price
bb
| Unnamed: 0 | Product Name | Price | MRP | Sub Category | Category | JioMart Price | DMart Price | |
|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285.00 | 330 | Tea | Beverages | 280.00 | 275.00 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132.00 | 170 | Tea | Beverages | 166.00 | 154.00 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526.00 | 531 | Tea | Beverages | 485.00 | 485.00 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500.00 | 550 | Tea | Beverages | 500.00 | 550.00 |
| 4 | 15 | Taj Mahal Tea 500 g | 391.00 | 410 | Tea | Beverages | 247.00 | 140.00 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194.00 | 200 | Fruit juices | Beverages | 150.00 | 199.00 |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 48.00 | 60 | Fruit juices | Beverages | 54.00 | 54.00 |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 59.00 | 100 | Fruit juices | Beverages | 67.00 | 67.00 |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85.00 | 85 | Coffee | Beverages | 85.00 | 85.00 |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274.35 | 295 | Coffee | Beverages | 274.35 | 274.35 |
119 rows × 8 columns
bb.rename(columns = {'Price':'BigBasket Price'}, inplace = True)
bb
| Unnamed: 0 | Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | |
|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285.00 | 330 | Tea | Beverages | 280.00 | 275.00 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132.00 | 170 | Tea | Beverages | 166.00 | 154.00 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526.00 | 531 | Tea | Beverages | 485.00 | 485.00 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500.00 | 550 | Tea | Beverages | 500.00 | 550.00 |
| 4 | 15 | Taj Mahal Tea 500 g | 391.00 | 410 | Tea | Beverages | 247.00 | 140.00 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194.00 | 200 | Fruit juices | Beverages | 150.00 | 199.00 |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 48.00 | 60 | Fruit juices | Beverages | 54.00 | 54.00 |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 59.00 | 100 | Fruit juices | Beverages | 67.00 | 67.00 |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85.00 | 85 | Coffee | Beverages | 85.00 | 85.00 |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274.35 | 295 | Coffee | Beverages | 274.35 | 274.35 |
119 rows × 8 columns
bb['BigBasket Price'] = bb['BigBasket Price'].apply(np.int64)
bb.head()
| Unnamed: 0 | Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | |
|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280.0 | 275.0 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166.0 | 154.0 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485.0 | 485.0 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500.0 | 550.0 |
| 4 | 15 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247.0 | 140.0 |
bb['JioMart Price'] = bb['JioMart Price'].apply(np.int64)
bb.head()
| Unnamed: 0 | Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | |
|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275.0 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154.0 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485 | 485.0 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500 | 550.0 |
| 4 | 15 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247 | 140.0 |
bb['Big Basket Savings']= bb['MRP']-bb['BigBasket Price']
bb
| Unnamed: 0 | Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275.00 | 45 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154.00 | 38 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485 | 485.00 | 5 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500 | 550.00 | 50 |
| 4 | 15 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247 | 140.00 | 19 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194 | 200 | Fruit juices | Beverages | 150 | 199.00 | 6 |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 48 | 60 | Fruit juices | Beverages | 54 | 54.00 | 12 |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 59 | 100 | Fruit juices | Beverages | 67 | 67.00 | 41 |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85 | 85 | Coffee | Beverages | 85 | 85.00 | 0 |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274 | 295 | Coffee | Beverages | 274 | 274.35 | 21 |
119 rows × 9 columns
bb['DMart Price'] = bb['DMart Price'].apply(np.int64)
bb.head()
| Unnamed: 0 | Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275 | 45 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154 | 38 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485 | 485 | 5 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500 | 550 | 50 |
| 4 | 15 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247 | 140 | 19 |
bb['JioMart Savings']= bb['MRP']-bb['JioMart Price']
bb
| Unnamed: 0 | Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | JioMart Savings | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275 | 45 | 50 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154 | 38 | 4 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485 | 485 | 5 | 46 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500 | 550 | 50 | 50 |
| 4 | 15 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247 | 140 | 19 | 163 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194 | 200 | Fruit juices | Beverages | 150 | 199 | 6 | 50 |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 48 | 60 | Fruit juices | Beverages | 54 | 54 | 12 | 6 |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 59 | 100 | Fruit juices | Beverages | 67 | 67 | 41 | 33 |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85 | 85 | Coffee | Beverages | 85 | 85 | 0 | 0 |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274 | 295 | Coffee | Beverages | 274 | 274 | 21 | 21 |
119 rows × 10 columns
bb['DMart Savings']= bb['MRP']-bb['DMart Price']
bb
| Unnamed: 0 | Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | JioMart Savings | DMart Savings | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275 | 45 | 50 | 55 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154 | 38 | 4 | 16 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485 | 485 | 5 | 46 | 46 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500 | 550 | 50 | 50 | 0 |
| 4 | 15 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247 | 140 | 19 | 163 | 270 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194 | 200 | Fruit juices | Beverages | 150 | 199 | 6 | 50 | 1 |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 48 | 60 | Fruit juices | Beverages | 54 | 54 | 12 | 6 | 6 |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 59 | 100 | Fruit juices | Beverages | 67 | 67 | 41 | 33 | 33 |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85 | 85 | Coffee | Beverages | 85 | 85 | 0 | 0 | 0 |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274 | 295 | Coffee | Beverages | 274 | 274 | 21 | 21 | 21 |
119 rows × 11 columns
bb['BigBasket Discount Percentage'] = (bb['Big Basket Savings']/bb['MRP'])*100
bb
| Unnamed: 0 | Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | JioMart Savings | DMart Savings | BigBasket Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275 | 45 | 50 | 55 | 13.636364 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154 | 38 | 4 | 16 | 22.352941 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485 | 485 | 5 | 46 | 46 | 0.941620 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500 | 550 | 50 | 50 | 0 | 9.090909 |
| 4 | 15 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247 | 140 | 19 | 163 | 270 | 4.634146 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194 | 200 | Fruit juices | Beverages | 150 | 199 | 6 | 50 | 1 | 3.000000 |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 48 | 60 | Fruit juices | Beverages | 54 | 54 | 12 | 6 | 6 | 20.000000 |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 59 | 100 | Fruit juices | Beverages | 67 | 67 | 41 | 33 | 33 | 41.000000 |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85 | 85 | Coffee | Beverages | 85 | 85 | 0 | 0 | 0 | 0.000000 |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274 | 295 | Coffee | Beverages | 274 | 274 | 21 | 21 | 21 | 7.118644 |
119 rows × 12 columns
bb['JioMart Discount Percentage'] = (bb['JioMart Savings']/bb['MRP'])*100
bb
| Unnamed: 0 | Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | JioMart Savings | DMart Savings | BigBasket Discount Percentage | JioMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275 | 45 | 50 | 55 | 13.636364 | 15.151515 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154 | 38 | 4 | 16 | 22.352941 | 2.352941 |
| 2 | 3 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485 | 485 | 5 | 46 | 46 | 0.941620 | 8.662900 |
| 3 | 14 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500 | 550 | 50 | 50 | 0 | 9.090909 | 9.090909 |
| 4 | 15 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247 | 140 | 19 | 163 | 270 | 4.634146 | 39.756098 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 114 | 223 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194 | 200 | Fruit juices | Beverages | 150 | 199 | 6 | 50 | 1 | 3.000000 | 25.000000 |
| 115 | 224 | Raw Pressery Mixed Fruit Juice 200 ml | 48 | 60 | Fruit juices | Beverages | 54 | 54 | 12 | 6 | 6 | 20.000000 | 10.000000 |
| 116 | 225 | Raw Pressery Orange Juice 250 ml | 59 | 100 | Fruit juices | Beverages | 67 | 67 | 41 | 33 | 33 | 41.000000 | 33.000000 |
| 117 | 143 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85 | 85 | Coffee | Beverages | 85 | 85 | 0 | 0 | 0 | 0.000000 | 0.000000 |
| 118 | 144 | Nescafe Classic Instant Coffee 100 g (Jar) | 274 | 295 | Coffee | Beverages | 274 | 274 | 21 | 21 | 21 | 7.118644 | 7.118644 |
119 rows × 13 columns
bb['DMart Discount Percentage'] = (bb['DMart Savings']/bb['MRP'])*100
bb.head(2)
| Unnamed: 0 | Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | JioMart Savings | DMart Savings | BigBasket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275 | 45 | 50 | 55 | 13.636364 | 15.151515 | 16.666667 |
| 1 | 2 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154 | 38 | 4 | 16 | 22.352941 | 2.352941 | 9.411765 |
bb.drop('Unnamed: 0', axis=1, inplace= True)
bb.head(2)
| Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | JioMart Savings | DMart Savings | BigBasket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275 | 45 | 50 | 55 | 13.636364 | 15.151515 | 16.666667 |
| 1 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154 | 38 | 4 | 16 | 22.352941 | 2.352941 | 9.411765 |
bb['BigBasket Discount Percentage'] = bb['BigBasket Discount Percentage'].apply(np.int64)
bb.head()
| Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | JioMart Savings | DMart Savings | BigBasket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275 | 45 | 50 | 55 | 13 | 15.151515 | 16.666667 |
| 1 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154 | 38 | 4 | 16 | 22 | 2.352941 | 9.411765 |
| 2 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485 | 485 | 5 | 46 | 46 | 0 | 8.662900 | 8.662900 |
| 3 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500 | 550 | 50 | 50 | 0 | 9 | 9.090909 | 0.000000 |
| 4 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247 | 140 | 19 | 163 | 270 | 4 | 39.756098 | 65.853659 |
bb['JioMart Discount Percentage'] = bb['JioMart Discount Percentage'].apply(np.int64)
bb.head()
| Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | JioMart Savings | DMart Savings | BigBasket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275 | 45 | 50 | 55 | 13 | 15 | 16.666667 |
| 1 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154 | 38 | 4 | 16 | 22 | 2 | 9.411765 |
| 2 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485 | 485 | 5 | 46 | 46 | 0 | 8 | 8.662900 |
| 3 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500 | 550 | 50 | 50 | 0 | 9 | 9 | 0.000000 |
| 4 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247 | 140 | 19 | 163 | 270 | 4 | 39 | 65.853659 |
bb['DMart Discount Percentage'] = bb['DMart Discount Percentage'].apply(np.int64)
bb.head()
| Product Name | BigBasket Price | MRP | Sub Category | Category | JioMart Price | DMart Price | Big Basket Savings | JioMart Savings | DMart Savings | BigBasket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 330 | Tea | Beverages | 280 | 275 | 45 | 50 | 55 | 13 | 15 | 16 |
| 1 | Brooke Bond Red Label Tea 250 gm | 132 | 170 | Tea | Beverages | 166 | 154 | 38 | 4 | 16 | 22 | 2 | 9 |
| 2 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 531 | Tea | Beverages | 485 | 485 | 5 | 46 | 46 | 0 | 8 | 8 |
| 3 | Taj Mahal Tea 1 Kg | 500 | 550 | Tea | Beverages | 500 | 550 | 50 | 50 | 0 | 9 | 9 | 0 |
| 4 | Taj Mahal Tea 500 g | 391 | 410 | Tea | Beverages | 247 | 140 | 19 | 163 | 270 | 4 | 39 | 65 |
bb = bb[['Product Name', 'BigBasket Price', 'JioMart Price', 'DMart Price', 'MRP', 'Category', 'Sub Category', 'Big Basket Savings', 'JioMart Savings', 'DMart Savings', 'BigBasket Discount Percentage', 'JioMart Discount Percentage', 'DMart Discount Percentage']]
bb
| Product Name | BigBasket Price | JioMart Price | DMart Price | MRP | Category | Sub Category | Big Basket Savings | JioMart Savings | DMart Savings | BigBasket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 280 | 275 | 330 | Beverages | Tea | 45 | 50 | 55 | 13 | 15 | 16 |
| 1 | Brooke Bond Red Label Tea 250 gm | 132 | 166 | 154 | 170 | Beverages | Tea | 38 | 4 | 16 | 22 | 2 | 9 |
| 2 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 485 | 485 | 531 | Beverages | Tea | 5 | 46 | 46 | 0 | 8 | 8 |
| 3 | Taj Mahal Tea 1 Kg | 500 | 500 | 550 | 550 | Beverages | Tea | 50 | 50 | 0 | 9 | 9 | 0 |
| 4 | Taj Mahal Tea 500 g | 391 | 247 | 140 | 410 | Beverages | Tea | 19 | 163 | 270 | 4 | 39 | 65 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 114 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194 | 150 | 199 | 200 | Beverages | Fruit juices | 6 | 50 | 1 | 3 | 25 | 0 |
| 115 | Raw Pressery Mixed Fruit Juice 200 ml | 48 | 54 | 54 | 60 | Beverages | Fruit juices | 12 | 6 | 6 | 20 | 10 | 10 |
| 116 | Raw Pressery Orange Juice 250 ml | 59 | 67 | 67 | 100 | Beverages | Fruit juices | 41 | 33 | 33 | 41 | 33 | 33 |
| 117 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85 | 85 | 85 | 85 | Beverages | Coffee | 0 | 0 | 0 | 0 | 0 | 0 |
| 118 | Nescafe Classic Instant Coffee 100 g (Jar) | 274 | 274 | 274 | 295 | Beverages | Coffee | 21 | 21 | 21 | 7 | 7 | 7 |
119 rows × 13 columns
bb.to_csv('Beverages.csv')
dairy= pd.read_csv('Dairy Dataset.csv')
dairy.head()
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | |
|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy & bakery |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy & bakery |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy & bakery |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy & bakery |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy & bakery |
dairy['Category']= 'Dairy and Bakery'
dairy.head()
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | |
|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery |
dairy.dtypes
Product Name object JioMart Price int64 DMart Price int64 BigBasket Price int64 MRP int64 SubCategory object Category object dtype: object
dairy['JioMart Savings']= dairy['MRP']-dairy['JioMart Price']
dairy
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | JioMart Savings | |
|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery | 5 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery | 9 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery | 30 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery | 47 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery | 49 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 119 | The Baker's Dozen CARROT WALNUT CAKE - 150 g 1... | 140 | 137 | 148 | 175 | Cakes and muffins | Dairy and Bakery | 35 |
| 120 | The Baker's Dozen BANANA BREAD - 400 g 100% WH... | 199 | 187 | 200 | 249 | Cakes and muffins | Dairy and Bakery | 50 |
| 121 | WiseCrack|Organic Rice Cakes -Brown Rice & Sup... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 |
| 122 | WiseCrack|Organic Rice Cakes -Brown Rice & Qui... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 |
| 123 | WiseCrack|Organic Rice Cakes -Flax Lovers|Glut... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 |
124 rows × 8 columns
dairy['DMart Savings']= dairy['MRP']-dairy['DMart Price']
dairy
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | JioMart Savings | DMart Savings | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery | 5 | 7 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery | 9 | 10 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery | 30 | 50 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery | 47 | 52 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery | 49 | 50 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 119 | The Baker's Dozen CARROT WALNUT CAKE - 150 g 1... | 140 | 137 | 148 | 175 | Cakes and muffins | Dairy and Bakery | 35 | 38 |
| 120 | The Baker's Dozen BANANA BREAD - 400 g 100% WH... | 199 | 187 | 200 | 249 | Cakes and muffins | Dairy and Bakery | 50 | 62 |
| 121 | WiseCrack|Organic Rice Cakes -Brown Rice & Sup... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 |
| 122 | WiseCrack|Organic Rice Cakes -Brown Rice & Qui... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 |
| 123 | WiseCrack|Organic Rice Cakes -Flax Lovers|Glut... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 |
124 rows × 9 columns
dairy['Big Basket Savings']= dairy['MRP']-dairy['BigBasket Price']
dairy
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | JioMart Savings | DMart Savings | Big Basket Savings | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery | 5 | 7 | 0 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery | 9 | 10 | 5 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery | 30 | 50 | 23 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery | 47 | 52 | 45 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery | 49 | 50 | 41 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 119 | The Baker's Dozen CARROT WALNUT CAKE - 150 g 1... | 140 | 137 | 148 | 175 | Cakes and muffins | Dairy and Bakery | 35 | 38 | 27 |
| 120 | The Baker's Dozen BANANA BREAD - 400 g 100% WH... | 199 | 187 | 200 | 249 | Cakes and muffins | Dairy and Bakery | 50 | 62 | 49 |
| 121 | WiseCrack|Organic Rice Cakes -Brown Rice & Sup... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 |
| 122 | WiseCrack|Organic Rice Cakes -Brown Rice & Qui... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 |
| 123 | WiseCrack|Organic Rice Cakes -Flax Lovers|Glut... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 |
124 rows × 10 columns
dairy['JioMart Discount Percentage'] = (dairy['JioMart Savings']/dairy['MRP'])*100
dairy
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | JioMart Savings | DMart Savings | Big Basket Savings | JioMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery | 5 | 7 | 0 | 10.638298 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery | 9 | 10 | 5 | 10.112360 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery | 30 | 50 | 23 | 5.000000 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery | 47 | 52 | 45 | 16.785714 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery | 49 | 50 | 41 | 18.846154 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 119 | The Baker's Dozen CARROT WALNUT CAKE - 150 g 1... | 140 | 137 | 148 | 175 | Cakes and muffins | Dairy and Bakery | 35 | 38 | 27 | 20.000000 |
| 120 | The Baker's Dozen BANANA BREAD - 400 g 100% WH... | 199 | 187 | 200 | 249 | Cakes and muffins | Dairy and Bakery | 50 | 62 | 49 | 20.080321 |
| 121 | WiseCrack|Organic Rice Cakes -Brown Rice & Sup... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15.000000 |
| 122 | WiseCrack|Organic Rice Cakes -Brown Rice & Qui... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15.000000 |
| 123 | WiseCrack|Organic Rice Cakes -Flax Lovers|Glut... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15.000000 |
124 rows × 11 columns
dairy['DMart Discount Percentage'] = (dairy['DMart Savings']/dairy['MRP'])*100
dairy
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | JioMart Savings | DMart Savings | Big Basket Savings | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery | 5 | 7 | 0 | 10.638298 | 14.893617 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery | 9 | 10 | 5 | 10.112360 | 11.235955 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery | 30 | 50 | 23 | 5.000000 | 8.333333 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery | 47 | 52 | 45 | 16.785714 | 18.571429 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery | 49 | 50 | 41 | 18.846154 | 19.230769 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 119 | The Baker's Dozen CARROT WALNUT CAKE - 150 g 1... | 140 | 137 | 148 | 175 | Cakes and muffins | Dairy and Bakery | 35 | 38 | 27 | 20.000000 | 21.714286 |
| 120 | The Baker's Dozen BANANA BREAD - 400 g 100% WH... | 199 | 187 | 200 | 249 | Cakes and muffins | Dairy and Bakery | 50 | 62 | 49 | 20.080321 | 24.899598 |
| 121 | WiseCrack|Organic Rice Cakes -Brown Rice & Sup... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15.000000 | 15.789474 |
| 122 | WiseCrack|Organic Rice Cakes -Brown Rice & Qui... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15.000000 | 15.789474 |
| 123 | WiseCrack|Organic Rice Cakes -Flax Lovers|Glut... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15.000000 | 15.789474 |
124 rows × 12 columns
dairy['Big Basket Discount Percentage'] = (dairy['Big Basket Savings']/dairy['MRP'])*100
dairy
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | JioMart Savings | DMart Savings | Big Basket Savings | JioMart Discount Percentage | DMart Discount Percentage | Big Basket Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery | 5 | 7 | 0 | 10.638298 | 14.893617 | 0.000000 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery | 9 | 10 | 5 | 10.112360 | 11.235955 | 5.617978 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery | 30 | 50 | 23 | 5.000000 | 8.333333 | 3.833333 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery | 47 | 52 | 45 | 16.785714 | 18.571429 | 16.071429 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery | 49 | 50 | 41 | 18.846154 | 19.230769 | 15.769231 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 119 | The Baker's Dozen CARROT WALNUT CAKE - 150 g 1... | 140 | 137 | 148 | 175 | Cakes and muffins | Dairy and Bakery | 35 | 38 | 27 | 20.000000 | 21.714286 | 15.428571 |
| 120 | The Baker's Dozen BANANA BREAD - 400 g 100% WH... | 199 | 187 | 200 | 249 | Cakes and muffins | Dairy and Bakery | 50 | 62 | 49 | 20.080321 | 24.899598 | 19.678715 |
| 121 | WiseCrack|Organic Rice Cakes -Brown Rice & Sup... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15.000000 | 15.789474 | 12.368421 |
| 122 | WiseCrack|Organic Rice Cakes -Brown Rice & Qui... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15.000000 | 15.789474 | 12.368421 |
| 123 | WiseCrack|Organic Rice Cakes -Flax Lovers|Glut... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15.000000 | 15.789474 | 12.368421 |
124 rows × 13 columns
dairy['JioMart Discount Percentage'] = dairy['JioMart Discount Percentage'].apply(np.int64)
dairy.head()
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | JioMart Savings | DMart Savings | Big Basket Savings | JioMart Discount Percentage | DMart Discount Percentage | Big Basket Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery | 5 | 7 | 0 | 10 | 14.893617 | 0.000000 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery | 9 | 10 | 5 | 10 | 11.235955 | 5.617978 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery | 30 | 50 | 23 | 5 | 8.333333 | 3.833333 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery | 47 | 52 | 45 | 16 | 18.571429 | 16.071429 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery | 49 | 50 | 41 | 18 | 19.230769 | 15.769231 |
dairy['DMart Discount Percentage'] = dairy['DMart Discount Percentage'].apply(np.int64)
dairy.head()
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | JioMart Savings | DMart Savings | Big Basket Savings | JioMart Discount Percentage | DMart Discount Percentage | Big Basket Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery | 5 | 7 | 0 | 10 | 14 | 0.000000 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery | 9 | 10 | 5 | 10 | 11 | 5.617978 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery | 30 | 50 | 23 | 5 | 8 | 3.833333 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery | 47 | 52 | 45 | 16 | 18 | 16.071429 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery | 49 | 50 | 41 | 18 | 19 | 15.769231 |
dairy['Big Basket Discount Percentage'] = dairy['Big Basket Discount Percentage'].apply(np.int64)
dairy.head()
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | SubCategory | Category | JioMart Savings | DMart Savings | Big Basket Savings | JioMart Discount Percentage | DMart Discount Percentage | Big Basket Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery | 5 | 7 | 0 | 10 | 14 | 0 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery | 9 | 10 | 5 | 10 | 11 | 5 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery | 30 | 50 | 23 | 5 | 8 | 3 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery | 47 | 52 | 45 | 16 | 18 | 16 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery | 49 | 50 | 41 | 18 | 19 | 15 |
dairy.rename(columns = {'SubCategory':'Sub Category'}, inplace = True)
dairy
| Product Name | JioMart Price | DMart Price | BigBasket Price | MRP | Sub Category | Category | JioMart Savings | DMart Savings | Big Basket Savings | JioMart Discount Percentage | DMart Discount Percentage | Big Basket Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 42 | 40 | 47 | 47 | Paneer | Dairy and Bakery | 5 | 7 | 0 | 10 | 14 | 0 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 80 | 79 | 84 | 89 | Paneer | Dairy and Bakery | 9 | 10 | 5 | 10 | 11 | 5 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 570 | 550 | 577 | 600 | Paneer | Dairy and Bakery | 30 | 50 | 23 | 5 | 8 | 3 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 233 | 228 | 235 | 280 | Paneer | Dairy and Bakery | 47 | 52 | 45 | 16 | 18 | 16 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 211 | 210 | 219 | 260 | Paneer | Dairy and Bakery | 49 | 50 | 41 | 18 | 19 | 15 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 119 | The Baker's Dozen CARROT WALNUT CAKE - 150 g 1... | 140 | 137 | 148 | 175 | Cakes and muffins | Dairy and Bakery | 35 | 38 | 27 | 20 | 21 | 15 |
| 120 | The Baker's Dozen BANANA BREAD - 400 g 100% WH... | 199 | 187 | 200 | 249 | Cakes and muffins | Dairy and Bakery | 50 | 62 | 49 | 20 | 24 | 19 |
| 121 | WiseCrack|Organic Rice Cakes -Brown Rice & Sup... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15 | 15 | 12 |
| 122 | WiseCrack|Organic Rice Cakes -Brown Rice & Qui... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15 | 15 | 12 |
| 123 | WiseCrack|Organic Rice Cakes -Flax Lovers|Glut... | 323 | 320 | 333 | 380 | Cakes and muffins | Dairy and Bakery | 57 | 60 | 47 | 15 | 15 | 12 |
124 rows × 13 columns
dairy = dairy[['Product Name', 'BigBasket Price', 'JioMart Price', 'DMart Price', 'MRP', 'Category', 'Sub Category', 'Big Basket Savings', 'JioMart Savings', 'DMart Savings', 'Big Basket Discount Percentage', 'JioMart Discount Percentage', 'DMart Discount Percentage']]
dairy
| Product Name | BigBasket Price | JioMart Price | DMart Price | MRP | Category | Sub Category | Big Basket Savings | JioMart Savings | DMart Savings | Big Basket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 47 | 42 | 40 | 47 | Dairy and Bakery | Paneer | 0 | 5 | 7 | 0 | 10 | 14 |
| 1 | Mother Dairy Malai Paneer 200 g (Pack) | 84 | 80 | 79 | 89 | Dairy and Bakery | Paneer | 5 | 9 | 10 | 5 | 10 | 11 |
| 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 577 | 570 | 550 | 600 | Dairy and Bakery | Paneer | 23 | 30 | 50 | 3 | 5 | 8 |
| 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 235 | 233 | 228 | 280 | Dairy and Bakery | Paneer | 45 | 47 | 52 | 16 | 16 | 18 |
| 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 219 | 211 | 210 | 260 | Dairy and Bakery | Paneer | 41 | 49 | 50 | 15 | 18 | 19 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 119 | The Baker's Dozen CARROT WALNUT CAKE - 150 g 1... | 148 | 140 | 137 | 175 | Dairy and Bakery | Cakes and muffins | 27 | 35 | 38 | 15 | 20 | 21 |
| 120 | The Baker's Dozen BANANA BREAD - 400 g 100% WH... | 200 | 199 | 187 | 249 | Dairy and Bakery | Cakes and muffins | 49 | 50 | 62 | 19 | 20 | 24 |
| 121 | WiseCrack|Organic Rice Cakes -Brown Rice & Sup... | 333 | 323 | 320 | 380 | Dairy and Bakery | Cakes and muffins | 47 | 57 | 60 | 12 | 15 | 15 |
| 122 | WiseCrack|Organic Rice Cakes -Brown Rice & Qui... | 333 | 323 | 320 | 380 | Dairy and Bakery | Cakes and muffins | 47 | 57 | 60 | 12 | 15 | 15 |
| 123 | WiseCrack|Organic Rice Cakes -Flax Lovers|Glut... | 333 | 323 | 320 | 380 | Dairy and Bakery | Cakes and muffins | 47 | 57 | 60 | 12 | 15 | 15 |
124 rows × 13 columns
dairy.to_csv('Dairy.csv')
snacks= pd.read_csv('Snacks Dataset.csv')
snacks.head()
| Product Name | JioMart Price | BigBasket Price | DMart Price | MRP | Sub Category | Category | |
|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 120 | 99 | 89 | 190 | Biscuits & cookies | Snacks |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 90 | 85 | 79 | 140 | Biscuits & cookies | Snacks |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 113 | 99 | 89 | 170 | Biscuits & cookies | Snacks |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 95 | 89 | 85 | 145 | Biscuits & cookies | Snacks |
| 4 | Parle-G Gold Biscuits 1 kg | 115 | 105 | 99 | 140 | Biscuits & cookies | Snacks |
snacks.dtypes
Product Name object JioMart Price int64 BigBasket Price int64 DMart Price int64 MRP int64 Sub Category object Category object dtype: object
snacks['JioMart Savings']= snacks['MRP']-snacks['JioMart Price']
snacks.head()
| Product Name | JioMart Price | BigBasket Price | DMart Price | MRP | Sub Category | Category | JioMart Savings | |
|---|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 120 | 99 | 89 | 190 | Biscuits & cookies | Snacks | 70 |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 90 | 85 | 79 | 140 | Biscuits & cookies | Snacks | 50 |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 113 | 99 | 89 | 170 | Biscuits & cookies | Snacks | 57 |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 95 | 89 | 85 | 145 | Biscuits & cookies | Snacks | 50 |
| 4 | Parle-G Gold Biscuits 1 kg | 115 | 105 | 99 | 140 | Biscuits & cookies | Snacks | 25 |
snacks['Big Basket Savings']= snacks['MRP']-snacks['BigBasket Price']
snacks.head()
| Product Name | JioMart Price | BigBasket Price | DMart Price | MRP | Sub Category | Category | JioMart Savings | Big Basket Savings | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 120 | 99 | 89 | 190 | Biscuits & cookies | Snacks | 70 | 91 |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 90 | 85 | 79 | 140 | Biscuits & cookies | Snacks | 50 | 55 |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 113 | 99 | 89 | 170 | Biscuits & cookies | Snacks | 57 | 71 |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 95 | 89 | 85 | 145 | Biscuits & cookies | Snacks | 50 | 56 |
| 4 | Parle-G Gold Biscuits 1 kg | 115 | 105 | 99 | 140 | Biscuits & cookies | Snacks | 25 | 35 |
snacks['DMart Savings']= snacks['MRP']-snacks['DMart Price']
snacks.head()
| Product Name | JioMart Price | BigBasket Price | DMart Price | MRP | Sub Category | Category | JioMart Savings | Big Basket Savings | DMart Savings | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 120 | 99 | 89 | 190 | Biscuits & cookies | Snacks | 70 | 91 | 101 |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 90 | 85 | 79 | 140 | Biscuits & cookies | Snacks | 50 | 55 | 61 |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 113 | 99 | 89 | 170 | Biscuits & cookies | Snacks | 57 | 71 | 81 |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 95 | 89 | 85 | 145 | Biscuits & cookies | Snacks | 50 | 56 | 60 |
| 4 | Parle-G Gold Biscuits 1 kg | 115 | 105 | 99 | 140 | Biscuits & cookies | Snacks | 25 | 35 | 41 |
snacks['JioMart Discount Percentage'] = (snacks['JioMart Savings']/snacks['MRP'])*100
snacks.head()
| Product Name | JioMart Price | BigBasket Price | DMart Price | MRP | Sub Category | Category | JioMart Savings | Big Basket Savings | DMart Savings | JioMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 120 | 99 | 89 | 190 | Biscuits & cookies | Snacks | 70 | 91 | 101 | 36.842105 |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 90 | 85 | 79 | 140 | Biscuits & cookies | Snacks | 50 | 55 | 61 | 35.714286 |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 113 | 99 | 89 | 170 | Biscuits & cookies | Snacks | 57 | 71 | 81 | 33.529412 |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 95 | 89 | 85 | 145 | Biscuits & cookies | Snacks | 50 | 56 | 60 | 34.482759 |
| 4 | Parle-G Gold Biscuits 1 kg | 115 | 105 | 99 | 140 | Biscuits & cookies | Snacks | 25 | 35 | 41 | 17.857143 |
snacks['Big Basket Discount Percentage'] = (snacks['Big Basket Savings']/snacks['MRP'])*100
snacks.head()
| Product Name | JioMart Price | BigBasket Price | DMart Price | MRP | Sub Category | Category | JioMart Savings | Big Basket Savings | DMart Savings | JioMart Discount Percentage | Big Basket Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 120 | 99 | 89 | 190 | Biscuits & cookies | Snacks | 70 | 91 | 101 | 36.842105 | 47.894737 |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 90 | 85 | 79 | 140 | Biscuits & cookies | Snacks | 50 | 55 | 61 | 35.714286 | 39.285714 |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 113 | 99 | 89 | 170 | Biscuits & cookies | Snacks | 57 | 71 | 81 | 33.529412 | 41.764706 |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 95 | 89 | 85 | 145 | Biscuits & cookies | Snacks | 50 | 56 | 60 | 34.482759 | 38.620690 |
| 4 | Parle-G Gold Biscuits 1 kg | 115 | 105 | 99 | 140 | Biscuits & cookies | Snacks | 25 | 35 | 41 | 17.857143 | 25.000000 |
snacks['DMart Discount Percentage'] = (snacks['DMart Savings']/snacks['MRP'])*100
snacks.head()
| Product Name | JioMart Price | BigBasket Price | DMart Price | MRP | Sub Category | Category | JioMart Savings | Big Basket Savings | DMart Savings | JioMart Discount Percentage | Big Basket Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 120 | 99 | 89 | 190 | Biscuits & cookies | Snacks | 70 | 91 | 101 | 36.842105 | 47.894737 | 53.157895 |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 90 | 85 | 79 | 140 | Biscuits & cookies | Snacks | 50 | 55 | 61 | 35.714286 | 39.285714 | 43.571429 |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 113 | 99 | 89 | 170 | Biscuits & cookies | Snacks | 57 | 71 | 81 | 33.529412 | 41.764706 | 47.647059 |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 95 | 89 | 85 | 145 | Biscuits & cookies | Snacks | 50 | 56 | 60 | 34.482759 | 38.620690 | 41.379310 |
| 4 | Parle-G Gold Biscuits 1 kg | 115 | 105 | 99 | 140 | Biscuits & cookies | Snacks | 25 | 35 | 41 | 17.857143 | 25.000000 | 29.285714 |
snacks['DMart Discount Percentage'] = snacks['DMart Discount Percentage'].apply(np.int64)
snacks.head()
| Product Name | JioMart Price | BigBasket Price | DMart Price | MRP | Sub Category | Category | JioMart Savings | Big Basket Savings | DMart Savings | JioMart Discount Percentage | Big Basket Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 120 | 99 | 89 | 190 | Biscuits & cookies | Snacks | 70 | 91 | 101 | 36.842105 | 47.894737 | 53 |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 90 | 85 | 79 | 140 | Biscuits & cookies | Snacks | 50 | 55 | 61 | 35.714286 | 39.285714 | 43 |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 113 | 99 | 89 | 170 | Biscuits & cookies | Snacks | 57 | 71 | 81 | 33.529412 | 41.764706 | 47 |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 95 | 89 | 85 | 145 | Biscuits & cookies | Snacks | 50 | 56 | 60 | 34.482759 | 38.620690 | 41 |
| 4 | Parle-G Gold Biscuits 1 kg | 115 | 105 | 99 | 140 | Biscuits & cookies | Snacks | 25 | 35 | 41 | 17.857143 | 25.000000 | 29 |
snacks['JioMart Discount Percentage'] = snacks['JioMart Discount Percentage'].apply(np.int64)
snacks.head()
| Product Name | JioMart Price | BigBasket Price | DMart Price | MRP | Sub Category | Category | JioMart Savings | Big Basket Savings | DMart Savings | JioMart Discount Percentage | Big Basket Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 120 | 99 | 89 | 190 | Biscuits & cookies | Snacks | 70 | 91 | 101 | 36 | 47.894737 | 53 |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 90 | 85 | 79 | 140 | Biscuits & cookies | Snacks | 50 | 55 | 61 | 35 | 39.285714 | 43 |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 113 | 99 | 89 | 170 | Biscuits & cookies | Snacks | 57 | 71 | 81 | 33 | 41.764706 | 47 |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 95 | 89 | 85 | 145 | Biscuits & cookies | Snacks | 50 | 56 | 60 | 34 | 38.620690 | 41 |
| 4 | Parle-G Gold Biscuits 1 kg | 115 | 105 | 99 | 140 | Biscuits & cookies | Snacks | 25 | 35 | 41 | 17 | 25.000000 | 29 |
snacks['Big Basket Discount Percentage'] = snacks['Big Basket Discount Percentage'].apply(np.int64)
snacks.head()
| Product Name | JioMart Price | BigBasket Price | DMart Price | MRP | Sub Category | Category | JioMart Savings | Big Basket Savings | DMart Savings | JioMart Discount Percentage | Big Basket Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 120 | 99 | 89 | 190 | Biscuits & cookies | Snacks | 70 | 91 | 101 | 36 | 47 | 53 |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 90 | 85 | 79 | 140 | Biscuits & cookies | Snacks | 50 | 55 | 61 | 35 | 39 | 43 |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 113 | 99 | 89 | 170 | Biscuits & cookies | Snacks | 57 | 71 | 81 | 33 | 41 | 47 |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 95 | 89 | 85 | 145 | Biscuits & cookies | Snacks | 50 | 56 | 60 | 34 | 38 | 41 |
| 4 | Parle-G Gold Biscuits 1 kg | 115 | 105 | 99 | 140 | Biscuits & cookies | Snacks | 25 | 35 | 41 | 17 | 25 | 29 |
snacks = snacks[['Product Name', 'BigBasket Price', 'JioMart Price', 'DMart Price', 'MRP', 'Category', 'Sub Category', 'Big Basket Savings', 'JioMart Savings', 'DMart Savings', 'Big Basket Discount Percentage', 'JioMart Discount Percentage', 'DMart Discount Percentage']]
snacks
| Product Name | BigBasket Price | JioMart Price | DMart Price | MRP | Category | Sub Category | Big Basket Savings | JioMart Savings | DMart Savings | Big Basket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 99 | 120 | 89 | 190 | Snacks | Biscuits & cookies | 91 | 70 | 101 | 47 | 36 | 53 |
| 1 | Britannia Good Day Chocochip Cookies 400 g | 85 | 90 | 79 | 140 | Snacks | Biscuits & cookies | 55 | 50 | 61 | 39 | 35 | 43 |
| 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 99 | 113 | 89 | 170 | Snacks | Biscuits & cookies | 71 | 57 | 81 | 41 | 33 | 47 |
| 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 89 | 95 | 85 | 145 | Snacks | Biscuits & cookies | 56 | 50 | 60 | 38 | 34 | 41 |
| 4 | Parle-G Gold Biscuits 1 kg | 105 | 115 | 99 | 140 | Snacks | Biscuits & cookies | 35 | 25 | 41 | 25 | 17 | 29 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 106 | Haldiram's Nagpur My Treat Rasgulla 120 g | 79 | 69 | 55 | 100 | Snacks | Indian sweets | 21 | 31 | 45 | 21 | 31 | 45 |
| 107 | Maganlal Crushed Peanut Chikki 250 g | 79 | 69 | 55 | 93 | Snacks | Indian sweets | 14 | 24 | 38 | 15 | 25 | 40 |
| 108 | Haldiram's Nagpur Taste of Tradition My Treat ... | 99 | 89 | 79 | 125 | Snacks | Indian sweets | 26 | 36 | 46 | 20 | 28 | 36 |
| 109 | Haldiram's Nagpur Rassagulla 500 g | 99 | 92 | 89 | 116 | Snacks | Indian sweets | 17 | 24 | 27 | 14 | 20 | 23 |
| 110 | Charlie's Crushed Peanut Chikki 150 g | 59 | 46 | 39 | 92 | Snacks | Indian sweets | 33 | 46 | 53 | 35 | 50 | 57 |
111 rows × 13 columns
snacks.to_csv('Snacks.csv')
import pandas as pd
import numpy as np
import numpy as np
import pandas as pd
import seaborn as sns
import plotly.express as px
import matplotlib.pyplot as plt
import plotly.figure_factory as ff
import plotly.graph_objects as go
df=pd.read_csv('Beverages.csv')
df
| Unnamed: 0 | Product Name | BigBasket Price | JioMart Price | DMart Price | MRP | Category | Sub Category | Big Basket Savings | JioMart Savings | DMart Savings | BigBasket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | Brooke Bond Red Label Natural Care Tea 500 gm | 285 | 280 | 275 | 330 | Beverages | Tea | 45 | 50 | 55 | 13 | 15 | 16 |
| 1 | 1 | Brooke Bond Red Label Tea 250 gm | 132 | 166 | 154 | 170 | Beverages | Tea | 38 | 4 | 16 | 22 | 2 | 9 |
| 2 | 2 | Brooke Bond Red Label Natural Care Tea 1 kg | 526 | 485 | 485 | 531 | Beverages | Tea | 5 | 46 | 46 | 0 | 8 | 8 |
| 3 | 3 | Taj Mahal Tea 1 Kg | 500 | 500 | 550 | 550 | Beverages | Tea | 50 | 50 | 0 | 9 | 9 | 0 |
| 4 | 4 | Taj Mahal Tea 500 g | 391 | 247 | 140 | 410 | Beverages | Tea | 19 | 163 | 270 | 4 | 39 | 65 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 114 | 114 | Raw Pressery Cold Pressed Mixed Fruit Juice 1 L | 194 | 150 | 199 | 200 | Beverages | Fruit juices | 6 | 50 | 1 | 3 | 25 | 0 |
| 115 | 115 | Raw Pressery Mixed Fruit Juice 200 ml | 48 | 54 | 54 | 60 | Beverages | Fruit juices | 12 | 6 | 6 | 20 | 10 | 10 |
| 116 | 116 | Raw Pressery Orange Juice 250 ml | 59 | 67 | 67 | 100 | Beverages | Fruit juices | 41 | 33 | 33 | 41 | 33 | 33 |
| 117 | 117 | Kaffe Blended Instant Coffee 50 g (Buy 1 Get 1) | 85 | 85 | 85 | 85 | Beverages | Coffee | 0 | 0 | 0 | 0 | 0 | 0 |
| 118 | 118 | Nescafe Classic Instant Coffee 100 g (Jar) | 274 | 274 | 274 | 295 | Beverages | Coffee | 21 | 21 | 21 | 7 | 7 | 7 |
119 rows × 14 columns
df=df.drop("Unnamed: 0",axis=1)
fig = px.pie(df, values='BigBasket Discount Percentage', names='Sub Category',title="Distribution of Sub Categories with respect to discount %")
fig.show()
df.describe()
| BigBasket Price | JioMart Price | DMart Price | MRP | Big Basket Savings | JioMart Savings | DMart Savings | BigBasket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|
| count | 119.00000 | 119.000000 | 119.000000 | 119.000000 | 119.000000 | 119.000000 | 119.000000 | 119.000000 | 119.000000 | 119.000000 |
| mean | 209.05042 | 210.571429 | 220.890756 | 283.873950 | 74.823529 | 73.302521 | 62.983193 | 22.773109 | 19.403361 | 17.252101 |
| std | 196.74417 | 184.263609 | 198.236410 | 285.385186 | 110.179872 | 125.404671 | 116.852869 | 14.315712 | 14.094307 | 13.927913 |
| min | 5.00000 | 5.000000 | 5.000000 | 5.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
| 25% | 71.50000 | 79.000000 | 77.000000 | 101.000000 | 10.000000 | 7.000000 | 6.500000 | 13.000000 | 8.500000 | 8.500000 |
| 50% | 151.00000 | 160.000000 | 160.000000 | 190.000000 | 36.000000 | 30.000000 | 21.000000 | 25.000000 | 15.000000 | 14.000000 |
| 75% | 279.50000 | 273.500000 | 278.000000 | 405.000000 | 91.500000 | 88.500000 | 63.500000 | 34.000000 | 30.000000 | 22.000000 |
| max | 1296.00000 | 1002.000000 | 1030.000000 | 1995.000000 | 699.000000 | 993.000000 | 965.000000 | 60.000000 | 60.000000 | 65.000000 |
for template in [ "plotly_dark"]:
fig = px.scatter_3d(df, x = 'BigBasket Price', y = 'JioMart Price', z = 'DMart Price', hover_name='Product Name',template=template, title="Know Your Data" )
fig.update_traces(marker=dict(size=4, color = 'deeppink',
line=dict(width=1,
color='Black')),
selector=dict(mode='markers'))
fig.show()
import plotly.graph_objects as go
y0 = [df['Big Basket Savings'].sum()]
y1 = [df['JioMart Savings'].sum()]
y2 = [df['DMart Savings'].sum()]
layout = go.Layout(title="<b>Total savings in beverages category</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig1 = go.Figure(layout=layout)
fig1.add_trace(go.Bar(y=y0,name='BigBasket Savings',
marker_color = 'yellow'))
fig1.add_trace(go.Bar(y=y1,name='JioMart Savings',
marker_color = 'green'))
fig1.add_trace(go.Bar(y=y2,name='DMart Savings',
marker_color = 'tomato'))
fig1.update_traces(width=0.075)
fig1.update_yaxes(showgrid=False),
fig1.update_layout(yaxis_title="Total savings(₹) ",title_x=0.5,plot_bgcolor='#2d3035')
fig1.show()
import plotly.graph_objects as go
y0 = [df['BigBasket Discount Percentage'].mean()]
y1 = [df['JioMart Discount Percentage'].mean()]
y2 = [df['DMart Discount Percentage'].mean()]
layout = go.Layout(title="<b>Average discount in each web-app in Beverage category</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig1 = go.Figure(layout=layout)
fig1.add_trace(go.Bar(y=y0,name='BigBasket Savings',
marker_color = 'violet'))
fig1.add_trace(go.Bar(y=y1,name='JioMart Savings',
marker_color = 'deepskyblue'))
fig1.add_trace(go.Bar(y=y2,name='DMart Savings',
marker_color = 'darkviolet'))
fig1.update_traces(width=0.075)
fig1.update_yaxes(showgrid=False),
fig1.update_layout(yaxis_title=" Discount(%) ",title_x=0.5,plot_bgcolor='#2d3035')
fig1.show()
import plotly.graph_objects as go
y0 = df['BigBasket Discount Percentage']
y1 = df['JioMart Discount Percentage']
y2 = df['DMart Discount Percentage']
layout = go.Layout(title="<b>Product vs discount(%)</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig2 = go.Figure(layout=layout)
fig2.add_trace(go.Scatter(y=y0,name='BigBasket Discount(%)',
marker_color = 'violet',))
fig2.add_trace(go.Scatter(y=y1,name='JioMart Discount(%)',
marker_color = 'deepskyblue'))
fig2.add_trace(go.Scatter(y=y2,name='DMart Discount(%)',
marker_color = 'darkviolet'))
fig2.update_yaxes(showgrid=False),
fig2.update_xaxes(showgrid=False),
fig2.update_layout(xaxis_title="Product Number",yaxis_title="Discount(%)",title_x=0.5,plot_bgcolor='#2d3035')
fig2.show()
import plotly.graph_objects as go
x0 = df[df['BigBasket Price']>400]
x1 = df[df['JioMart Price']>400]
x2 = df[df['DMart Price']>400]
y0=x0['BigBasket Discount Percentage']
y1=x1['JioMart Discount Percentage']
y2=x2["DMart Discount Percentage"]
layout = go.Layout(title="<b>Discount on products above ₹400</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig2 = go.Figure(layout=layout)
fig2.add_trace(go.Box(y=y0,name='BigBasket',
marker_color = 'lime',))
fig2.add_trace(go.Box(y=y1,name='JioMart ',
marker_color = 'hotpink'))
fig2.add_trace(go.Box(y=y2,name='DMart ',
marker_color = 'blueviolet'))
fig2.update_yaxes(showgrid=False),
fig2.update_layout(yaxis_title="Discount(%)",title_x=0.5,plot_bgcolor='#2d3035')
fig2.show()
import plotly.graph_objects as go
x0 = df[df['BigBasket Price']<400]
x1 = df[df['JioMart Price']<400]
x2 = df[df['DMart Price']<400]
y0=x0['BigBasket Discount Percentage']
y1=x1['JioMart Discount Percentage']
y2=x2["DMart Discount Percentage"]
layout = go.Layout(title="<b>Discount on products below ₹400</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig2 = go.Figure(layout=layout)
fig2.add_trace(go.Box(y=y0,name='BigBasket Discount',
marker_color = 'lime',))
fig2.add_trace(go.Box(y=y1,name='JioMart Discount',
marker_color = 'hotpink'))
fig2.add_trace(go.Box(y=y2,name='DMart Discount',
marker_color = 'blueviolet'))
fig2.update_yaxes(showgrid=False),
fig2.update_layout(yaxis_title="Discount(%)",title_x=0.5,plot_bgcolor='#2d3035')
fig2.show()
df2= pd.read_csv('dairy.csv')
df2.head()
| Unnamed: 0 | Product Name | BigBasket Price | JioMart Price | DMart Price | MRP | Category | Sub Category | Big Basket Savings | JioMart Savings | DMart Savings | Big Basket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | Bio Nutrients Pure Diet Soy Paneer 200 g (Pack) | 47 | 42 | 40 | 47 | Dairy and Bakery | Paneer | 0 | 5 | 7 | 0 | 10 | 14 |
| 1 | 1 | Mother Dairy Malai Paneer 200 g (Pack) | 84 | 80 | 79 | 89 | Dairy and Bakery | Paneer | 5 | 9 | 10 | 5 | 10 | 11 |
| 2 | 2 | Urban Platter Firm Tofu, 200g ( Pack Of 2) | 577 | 570 | 550 | 600 | Dairy and Bakery | Paneer | 23 | 30 | 50 | 3 | 5 | 8 |
| 3 | 3 | Soyfit Tofu Supreme Chilli and Supreme Garlic ... | 235 | 233 | 228 | 280 | Dairy and Bakery | Paneer | 45 | 47 | 52 | 16 | 16 | 18 |
| 4 | 4 | Soyfit Tofu Supreme Regular and Supreme Garlic... | 219 | 211 | 210 | 260 | Dairy and Bakery | Paneer | 41 | 49 | 50 | 15 | 18 | 19 |
df2.drop('Unnamed: 0', axis=1, inplace= True)
fig2 = px.pie(df2, values='Big Basket Discount Percentage', names='Sub Category',title="Distibution of Sub Categories with respect to discount %")
fig2.show()
df2.describe()
| BigBasket Price | JioMart Price | DMart Price | MRP | Big Basket Savings | JioMart Savings | DMart Savings | Big Basket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|
| count | 124.000000 | 124.000000 | 124.000000 | 124.000000 | 124.000000 | 124.000000 | 124.000000 | 124.000000 | 124.00000 | 124.000000 |
| mean | 242.532258 | 239.040323 | 236.314516 | 353.185484 | 110.653226 | 114.145161 | 116.870968 | 13.725806 | 18.00000 | 20.951613 |
| std | 240.358791 | 246.123916 | 247.310389 | 514.210032 | 306.472907 | 302.229055 | 301.478578 | 17.561663 | 15.80676 | 16.838233 |
| min | 10.000000 | 9.000000 | 2.000000 | 10.000000 | 0.000000 | 1.000000 | 1.000000 | 0.000000 | 3.00000 | 2.000000 |
| 25% | 86.250000 | 80.000000 | 78.500000 | 98.750000 | 0.000000 | 8.750000 | 14.500000 | 0.000000 | 7.00000 | 9.750000 |
| 50% | 150.000000 | 130.000000 | 132.500000 | 159.500000 | 17.000000 | 29.000000 | 30.000000 | 6.500000 | 15.00000 | 16.500000 |
| 75% | 352.500000 | 360.000000 | 360.000000 | 407.500000 | 49.250000 | 51.250000 | 55.750000 | 18.250000 | 20.50000 | 26.000000 |
| max | 1176.000000 | 1184.000000 | 1184.000000 | 2699.000000 | 1572.000000 | 1565.000000 | 1565.000000 | 66.000000 | 66.00000 | 95.000000 |
for template in [ "plotly_dark"]:
fig = px.scatter_3d(df2, x = 'BigBasket Price', y = 'JioMart Price', z = 'DMart Price', hover_name='Product Name',template=template, title="Know Your Data" )
fig.update_traces(marker=dict(size=4, color = 'deeppink',
line=dict(width=1,
color='Black')),
selector=dict(mode='markers'))
fig.show()
import plotly.graph_objects as go
y0 = [df2['Big Basket Savings'].sum()]
y1 = [df2['JioMart Savings'].sum()]
y2 = [df2['DMart Savings'].sum()]
layout = go.Layout(title="<b>Total Savings in Dairy Category</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig1 = go.Figure(layout=layout)
fig1.add_trace(go.Bar(y=y0,name='Big Basket Savings',
marker_color = 'yellow'))
fig1.add_trace(go.Bar(y=y1,name='JioMart Savings',
marker_color = 'green'))
fig1.add_trace(go.Bar(y=y2,name='DMart Savings',
marker_color = 'tomato'))
fig1.update_traces(width=0.075)
fig1.update_yaxes(showgrid=False),
fig1.update_layout(yaxis_title="Total savings(₹) ",title_x=0.5,plot_bgcolor='#2d3035')
fig1.show()
import plotly.graph_objects as go
y0 = [df2['Big Basket Discount Percentage'].mean()]
y1 = [df2['JioMart Discount Percentage'].mean()]
y2 = [df2['DMart Discount Percentage'].mean()]
layout = go.Layout(title="<b>Average Discount in each web-app in Dairy Category</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig1 = go.Figure(layout=layout)
fig1.add_trace(go.Bar(y=y0,name='Big Basket Savings',
marker_color = 'violet'))
fig1.add_trace(go.Bar(y=y1,name='JioMart Savings',
marker_color = 'deepskyblue'))
fig1.add_trace(go.Bar(y=y2,name='DMart Savings',
marker_color = 'darkviolet'))
fig1.update_traces(width=0.075)
fig1.update_yaxes(showgrid=False),
fig1.update_layout(yaxis_title=" Discount(%) ",title_x=0.5,plot_bgcolor='#2d3035')
fig1.show()
import plotly.graph_objects as go
y0 = df2['Big Basket Discount Percentage']
y1 = df2['JioMart Discount Percentage']
y2 = df2['DMart Discount Percentage']
layout = go.Layout(title="<b>Product vs discount(%)</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig2 = go.Figure(layout=layout)
fig2.add_trace(go.Scatter(y=y0,name='Big Basket Discount(%)',
marker_color = 'violet',))
fig2.add_trace(go.Scatter(y=y1,name='JioMart Discount(%)',
marker_color = 'deepskyblue'))
fig2.add_trace(go.Scatter(y=y2,name='DMart Discount(%)',
marker_color = 'darkviolet'))
fig2.update_yaxes(showgrid=False),
fig2.update_xaxes(showgrid=False),
fig2.update_layout(xaxis_title="Product Number",yaxis_title="Discount(%)",title_x=0.5,plot_bgcolor='#2d3035')
fig2.show()
import plotly.graph_objects as go
x0 = df2[df2['BigBasket Price']>400]
x1 = df2[df2['JioMart Price']>400]
x2 = df2[df2['DMart Price']>400]
y0=x0['Big Basket Discount Percentage']
y1=x1['JioMart Discount Percentage']
y2=x2["DMart Discount Percentage"]
layout = go.Layout(title="<b>Discount on products above ₹400</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig2 = go.Figure(layout=layout)
fig2.add_trace(go.Box(y=y0,name='BigBasket',
marker_color = 'lime',))
fig2.add_trace(go.Box(y=y1,name='JioMart ',
marker_color = 'hotpink'))
fig2.add_trace(go.Box(y=y2,name='DMart ',
marker_color = 'blueviolet'))
fig2.update_yaxes(showgrid=False),
fig2.update_layout(yaxis_title="Discount(%)",title_x=0.5,plot_bgcolor='#2d3035')
fig2.show()
import plotly.graph_objects as go
x0 = df2[df2['BigBasket Price']<400]
x1 = df2[df2['JioMart Price']<400]
x2 = df2[df2['DMart Price']<400]
y0=x0['Big Basket Discount Percentage']
y1=x1['JioMart Discount Percentage']
y2=x2["DMart Discount Percentage"]
layout = go.Layout(title="<b>Discount on products below ₹400</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig2 = go.Figure(layout=layout)
fig2.add_trace(go.Box(y=y0,name='BigBasket Discount',
marker_color = 'lime',))
fig2.add_trace(go.Box(y=y1,name='JioMart Discount',
marker_color = 'hotpink'))
fig2.add_trace(go.Box(y=y2,name='DMart Discount',
marker_color = 'blueviolet'))
fig2.update_yaxes(showgrid=False),
fig2.update_layout(yaxis_title="Discount(%)",title_x=0.5,plot_bgcolor='#2d3035')
fig2.show()
df3= pd.read_csv('Snacks.csv')
df3
| Unnamed: 0 | Product Name | BigBasket Price | JioMart Price | DMart Price | MRP | Category | Sub Category | Big Basket Savings | JioMart Savings | DMart Savings | Big Basket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | Parle 20-20 Gold Cashew Almond Cookies 600 g | 99 | 120 | 89 | 190 | Snacks | Biscuits & cookies | 91 | 70 | 101 | 47 | 36 | 53 |
| 1 | 1 | Britannia Good Day Chocochip Cookies 400 g | 85 | 90 | 79 | 140 | Snacks | Biscuits & cookies | 55 | 50 | 61 | 39 | 35 | 43 |
| 2 | 2 | Sunfeast Dark Fantasy Original Choco Filled Bi... | 99 | 113 | 89 | 170 | Snacks | Biscuits & cookies | 71 | 57 | 81 | 41 | 33 | 47 |
| 3 | 3 | Cadbury Oreo Original Chocolatey Sandwich Bisc... | 89 | 95 | 85 | 145 | Snacks | Biscuits & cookies | 56 | 50 | 60 | 38 | 34 | 41 |
| 4 | 4 | Parle-G Gold Biscuits 1 kg | 105 | 115 | 99 | 140 | Snacks | Biscuits & cookies | 35 | 25 | 41 | 25 | 17 | 29 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 106 | 106 | Haldiram's Nagpur My Treat Rasgulla 120 g | 79 | 69 | 55 | 100 | Snacks | Indian sweets | 21 | 31 | 45 | 21 | 31 | 45 |
| 107 | 107 | Maganlal Crushed Peanut Chikki 250 g | 79 | 69 | 55 | 93 | Snacks | Indian sweets | 14 | 24 | 38 | 15 | 25 | 40 |
| 108 | 108 | Haldiram's Nagpur Taste of Tradition My Treat ... | 99 | 89 | 79 | 125 | Snacks | Indian sweets | 26 | 36 | 46 | 20 | 28 | 36 |
| 109 | 109 | Haldiram's Nagpur Rassagulla 500 g | 99 | 92 | 89 | 116 | Snacks | Indian sweets | 17 | 24 | 27 | 14 | 20 | 23 |
| 110 | 110 | Charlie's Crushed Peanut Chikki 150 g | 59 | 46 | 39 | 92 | Snacks | Indian sweets | 33 | 46 | 53 | 35 | 50 | 57 |
111 rows × 14 columns
df3.drop('Unnamed: 0', axis=1, inplace= True)
fig3 = px.pie(df3, values='Big Basket Discount Percentage', names='Sub Category',title="Distibution of Sub Categories with respect to discount %")
fig3.show()
df3.describe()
| BigBasket Price | JioMart Price | DMart Price | MRP | Big Basket Savings | JioMart Savings | DMart Savings | Big Basket Discount Percentage | JioMart Discount Percentage | DMart Discount Percentage | |
|---|---|---|---|---|---|---|---|---|---|---|
| count | 111.000000 | 111.000000 | 111.000000 | 111.000000 | 111.000000 | 111.000000 | 111.000000 | 111.000000 | 111.000000 | 111.000000 |
| mean | 113.297297 | 110.126126 | 102.135135 | 156.567568 | 43.270270 | 46.441441 | 54.432432 | 24.567568 | 24.486486 | 30.378378 |
| std | 103.527738 | 98.517384 | 92.096539 | 150.797795 | 57.105954 | 63.574535 | 71.109726 | 14.601757 | 15.404170 | 15.151990 |
| min | 9.000000 | 10.000000 | 9.000000 | 10.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 |
| 25% | 37.000000 | 37.000000 | 36.000000 | 50.000000 | 9.500000 | 10.000000 | 11.000000 | 13.000000 | 10.000000 | 17.000000 |
| 50% | 79.000000 | 75.000000 | 69.000000 | 100.000000 | 25.000000 | 24.000000 | 30.000000 | 21.000000 | 22.000000 | 29.000000 |
| 75% | 169.000000 | 157.000000 | 149.000000 | 199.000000 | 50.500000 | 51.000000 | 63.500000 | 36.000000 | 36.000000 | 43.000000 |
| max | 459.000000 | 455.000000 | 429.000000 | 745.000000 | 301.000000 | 301.000000 | 371.000000 | 53.000000 | 53.000000 | 61.000000 |
for template in [ "plotly_dark"]:
fig = px.scatter_3d(df3, x = 'BigBasket Price', y = 'JioMart Price', z = 'DMart Price', hover_name='Product Name',template=template, title="Know Your Data" )
fig.update_traces(marker=dict(size=4, color = 'deeppink',
line=dict(width=1,
color='Black')),
selector=dict(mode='markers'))
fig.show()
import plotly.graph_objects as go
y0 = [df3['Big Basket Savings'].sum()]
y1 = [df3['JioMart Savings'].sum()]
y2 = [df3['DMart Savings'].sum()]
layout = go.Layout(title="<b>Total Savings in Snacks Category</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig1 = go.Figure(layout=layout)
fig1.add_trace(go.Bar(y=y0,name='Big Basket Savings',
marker_color = 'yellow'))
fig1.add_trace(go.Bar(y=y1,name='JioMart Savings',
marker_color = 'green'))
fig1.add_trace(go.Bar(y=y2,name='DMart Savings',
marker_color = 'tomato'))
fig1.update_traces(width=0.075)
fig1.update_yaxes(showgrid=False),
fig1.update_layout(yaxis_title="Total savings(₹) ",title_x=0.5,plot_bgcolor='#2d3035')
fig1.show()
import plotly.graph_objects as go
y0 = [df3['Big Basket Discount Percentage'].mean()]
y1 = [df3['JioMart Discount Percentage'].mean()]
y2 = [df3['DMart Discount Percentage'].mean()]
layout = go.Layout(title="<b>Average Discount in each web-app in Snacks Category</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig1 = go.Figure(layout=layout)
fig1.add_trace(go.Bar(y=y0,name='Big Basket Savings',
marker_color = 'violet'))
fig1.add_trace(go.Bar(y=y1,name='JioMart Savings',
marker_color = 'deepskyblue'))
fig1.add_trace(go.Bar(y=y2,name='DMart Savings',
marker_color = 'darkviolet'))
fig1.update_traces(width=0.075)
fig1.update_yaxes(showgrid=False),
fig1.update_layout(yaxis_title=" Discount(%) ",title_x=0.5,plot_bgcolor='#2d3035')
fig1.show()
import plotly.graph_objects as go
y0 = df3['Big Basket Discount Percentage']
y1 = df3['JioMart Discount Percentage']
y2 = df3['DMart Discount Percentage']
layout = go.Layout(title="<b>Product vs discount(%)</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig2 = go.Figure(layout=layout)
fig2.add_trace(go.Scatter(y=y0,name='Big Basket Discount(%)',
marker_color = 'violet',))
fig2.add_trace(go.Scatter(y=y1,name='JioMart Discount(%)',
marker_color = 'deepskyblue'))
fig2.add_trace(go.Scatter(y=y2,name='DMart Discount(%)',
marker_color = 'darkviolet'))
fig2.update_yaxes(showgrid=False),
fig2.update_xaxes(showgrid=False),
fig2.update_layout(xaxis_title="Product Number",yaxis_title="Discount(%)",title_x=0.5,plot_bgcolor='#2d3035')
fig2.show()
import plotly.graph_objects as go
x0 = df3[df3['BigBasket Price']>400]
x1 = df3[df3['JioMart Price']>400]
x2 = df3[df3['DMart Price']>400]
y0=x0['Big Basket Discount Percentage']
y1=x1['JioMart Discount Percentage']
y2=x2["DMart Discount Percentage"]
layout = go.Layout(title="<b>Discount on products above ₹400</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig2 = go.Figure(layout=layout)
fig2.add_trace(go.Box(y=y0,name='BigBasket',
marker_color = 'lime',))
fig2.add_trace(go.Box(y=y1,name='JioMart ',
marker_color = 'hotpink'))
fig2.add_trace(go.Box(y=y2,name='DMart ',
marker_color = 'blueviolet'))
fig2.update_yaxes(showgrid=False),
fig2.update_layout(yaxis_title="Discount(%)",title_x=0.5,plot_bgcolor='#2d3035')
fig2.show()
import plotly.graph_objects as go
x0 = df3[df3['BigBasket Price']<400]
x1 = df3[df3['JioMart Price']<400]
x2 = df3[df3['DMart Price']<400]
y0=x0['Big Basket Discount Percentage']
y1=x1['JioMart Discount Percentage']
y2=x2["DMart Discount Percentage"]
layout = go.Layout(title="<b>Discount on products below ₹400</b>", legend=dict(x=0.5, y=1.1, orientation="h"))
fig2 = go.Figure(layout=layout)
fig2.add_trace(go.Box(y=y0,name='BigBasket Discount',
marker_color = 'lime',))
fig2.add_trace(go.Box(y=y1,name='JioMart Discount',
marker_color = 'hotpink'))
fig2.add_trace(go.Box(y=y2,name='DMart Discount',
marker_color = 'blueviolet'))
fig2.update_yaxes(showgrid=False),
fig2.update_layout(yaxis_title="Discount(%)",title_x=0.5,plot_bgcolor='#2d3035')
fig2.show()